<template>
	<view class="magic-card">
		<view class="header flex justify-between align-center" @click="$emit('headerTap')">
			<slot name="headerLeft">
				<text class="header-text">{{headerTitle}}</text>
			</slot>
			<slot name="headerRight">
				<text class="iconfont1 icon-jiantou1 arrow-right-icon"></text>
			</slot>
		</view>
		<view class="body">
			<slot name="body"></slot>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			headerTitle:{
				type:String,
				default:()=>""
			}
		}
	}
</script>

<style lang="scss" scoped>
	.magic-card{
		background: #FFFFFF;
		border-radius: 21rpx;
		.header{
			padding: 0 30rpx;
			height: 69rpx;
			border-bottom: 1rpx solid #dadada;
			.header-text{
				font-size: 28rpx;
				color: #333333;
				font-weight: bold;
			}
			.arrow-right-icon{
				color: #666;
				font-size: 26rpx;
			}
		}
	}
</style>
